Warn about -o appearing on command line before -i.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 12 Dec 2005 15:42:27 +0000 (15:42 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 12 Dec 2005 15:42:27 +0000 (15:42 +0000)
gpsbabel/main.c

index 012acf37bf4f828e199471d9d691d270039c2004..c0e79533fddb78aad6915db01fe1bc36d1e4e8a3 100644 (file)
@@ -161,6 +161,9 @@ main(int argc, char *argv[])
                                ivecs = find_vec(optarg, &ivec_opts);
                                break;
                        case 'o':
+                               if (ivecs == NULL) {
+                                       warning ("-o appeared before -i.   This is probably not what you want to do.\n");
+                               }
                                optarg = argv[argn][2]
                                        ? argv[argn]+2 : argv[++argn];
                                ovecs = find_vec(optarg, &ovec_opts);